﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="List.aspx.cs" Inherits="List" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">
    <title><%=title %></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/base.css" rel="stylesheet" type="text/css" />
    <link href="/css/home.css" rel="stylesheet" type="text/css" />
     <link href="/css/patch.css" rel="stylesheet" type="text/css" />
     <!--#include file="~/Public/commonjs.shtml" -->
</head>
<body>
   
   
 	 <!--#include file="~/Public/top.shtml" -->
     <!--main开始-->
     <div class="main w960 cb pr">
        <!--#include file="/Public/onlineqq.shtml" -->
       <div class="block1 mt10">
         <!--left-->
         <div class="m_left">
         <div class="cb mb10">
           <h2><%=fCategoryName%></h2>
           <ul class="left_bar">

              <%
                 if (categoryMenu != null)
                 {
                     foreach (Categories c in categoryMenu)
                     {
              %>
             <li class="sel"><a href="<%=bllUrl.GetGoodsListUrl(q.FCategoryID,c.CategoryID) %>"><%=c.CategoryName %></a></li>
             <%}
                 } %>

           </ul>
           <div class="left_bar_bottom"></div>
           </div>
          
           <div class="cb mb10">
           <div class="left_bar_hot"></div>
           <div class="left_hot">
             <div class="white_bg">
                 <!--#include file="~/AutoGenerate/list-hotgoods-words.shtml" -->
             </div>
             
             <div class="left_hot_list">
                <!--#include file="~/AutoGenerate/list-hotgoods-pic.shtml" -->
             
             </div>
           </div>
           
           <div class="left_bar_bottom"></div>
           </div>
         </div>
         <!--left end-->
         <!--right-->
         <div class="m_right ft">
            <p class="tar">
              当前位置： <a href="/index.aspx">首页</a> > <%=fCategoryName%>
            </p>


 						<div class="area">
              <div class="area_top"></div>
              <div class="area_main">

              <%
                  if (filter.listOfCategory != null)
                  { %>
              <dl>
                  <dt>类别：</dt>
                  <dd>
                    <ul>
                      <li><a href="<%=GetFilterUrl(FilterEnum.类别,0) %>" class="<%=q.TCategoryID==0?"cur":"" %>">不限</a></li>
                      <%
                     
                         for (int i = 0; i < filter.listOfCategory.Count ; ++i)
                         {
                             string className1 = "";
                             string className2 = "";
                             if (q.TCategoryID == filter.listOfCategory[i].ID) className1 = "cur";
                             if ((i + 1) == filter.listOfCategory.Count) className2 = "w98";
                %>
                <li class="<%=className2 %>"><a href="<%=GetFilterUrl(FilterEnum.类别,filter.listOfCategory[i].ID) %>" class="<%=className1 %>"><%=filter.listOfCategory[i].Name%></a></li>
                <%}
                    %>              
                    </ul>
                  </dd>
                  
                </dl>
                <%} %>
                <%
                    if (filter.listOfPlace != null)
                    { %>
                <dl>
                  <dt>产地：</dt>
                  <dd>
                    <ul>
                      <li><a href="<%=GetFilterUrl(FilterEnum.产地,0) %>" class="<%=q.GoodsPlaceID==0?"cur":"" %>">不限</a></li>
                       <% 
                     
                    for (int i = 0; i < filter.listOfPlace.Count && i < 8; ++i)
                    {
                        string className1 = "";
                        string className2 = "";
                        if (q.GoodsPlaceID == filter.listOfPlace[i].ID) className1 = "cur";
                        if ((i + 1) == filter.listOfPlace.Count) className2 = "w98";
                %>
                <li class="<%=className2 %>"><a href="<%=GetFilterUrl(FilterEnum.产地,filter.listOfPlace[i].ID) %>" class="<%=className1 %>"><%=filter.listOfPlace[i].Name%></a></li>
                <%}
                    %>                 
                    </ul>
                  </dd>
                  
                </dl>
                <%} %>


                <%
                    if (filter.listOfBrand != null)
                    { %>
                <dl>
                  <dt>品牌：</dt>
                  <dd>
                    <ul>
                      <li><a href="<%=GetFilterUrl(FilterEnum.品牌,0) %>" class="<%=q.BrandID==0?"cur":"" %>">不限</a></li>
                      <% 
                     
                    for (int i = 0; i < filter.listOfBrand.Count; ++i)
                    {
                        string className1 = "";
                        string className2 = "";
                        if (q.BrandID == filter.listOfBrand[i].ID) className1 = "cur";
                        if ((i + 1) == filter.listOfBrand.Count) className2 = "w98";
                %>
                <li class="<%=className2 %>"><a href="<%=GetFilterUrl(FilterEnum.品牌,filter.listOfBrand[i].ID) %>" class="<%=className1 %>"><%=filter.listOfBrand[i].Name%></a></li>
                <%}
                    %>
                                         
                    </ul>
                  </dd>
                </dl>
                <%} %>


                <%
                    if (filter.listOfUnit != null)
                    {
                         %>
                <dl>
                  <dt>包装：</dt>
                  <dd>
                    <ul>
                      <li><a href="<%=GetFilterUrl(FilterEnum.包装,0) %>" class="<%=q.PackUnitID==0?"cur":"" %>">不限</a></li>
                     <% 
                     
                    for (int i = 0; i < filter.listOfUnit.Count; ++i)
                    {
                        string className1 = "";
                        string className2 = "";
                        if (q.PackUnitID == filter.listOfUnit[i].ID) className1 = "cur";
                        if ((i + 1) == filter.listOfUnit.Count) className2 = "w98";
                %>
                <li class="<%=className2 %>"><a href="<%=GetFilterUrl(FilterEnum.包装,filter.listOfUnit[i].ID) %>" class="<%=className1 %>"><%=filter.listOfUnit[i].Name%></a></li>
                <%}
                    %>              
                    </ul>
                  </dd>
                </dl>
                 <%} %>

                <dl>
                  <dt>价格：</dt>
                  <dd>
                    <ul>
                      <li><a href="<%=GetFilterUrl(FilterEnum.价格,0) %>" class="<%=q.GoodsPriceCondID==0?"cur":"" %>">不限</a></li>
                       <% for (int i = 0; i < filter.listOfPrice.Count; ++i)
                    {
                        string className1="";
                        string className2 = "";
                        if (q.GoodsPriceCondID == filter.listOfPrice[i].ID) className1 = "cur";
                        if ((i + 1) == filter.listOfPrice.Count) className2 = "w98";
                %>
                <li class="<%=className2 %>"><a href="<%=GetFilterUrl(FilterEnum.价格,filter.listOfPrice[i].ID) %>" class="<%=className1 %>"><%=filter.listOfPrice[i].Name%></a></li>
                <%} %>
                    </ul>
                  </dd>
                  
                </dl>
               
              </div>
              <div class="area_bottom"></div>

            
            </div>
            <!--休闲食品-->
            <div class="food_x">
              <div class="food_x_top">
 <div class="fl b_titles"><%=fCategoryName %> <br/><span>SNACK FOODS</span></div>
                <div class="fr"><!--<a href="#">美国</a> |  <a href="#">日本</a> |  <a href="#">韩国</a> |  <a href="#">澳大利亚</a> |  <a href="#">菲律宾</a>--></div>

              </div>
              <div class="food_x_main">
                
                <%
                    if (listOfGoods != null)
                    {
                        foreach (GoodsInfo g in listOfGoods)
                        {
                 %>
                 <ul class="p_food_list">
                   <li class="mask_pic2"><a href="/Goods/<%=g.BaseInfo.GoodsID %>.html" target="_blank" title="<%=g.BaseInfo.GoodsName %> <%=g.BaseInfo.Promotions %>">
                    <img src="/images/p_food_bg2.gif" class="mask_pic"/> 
                    <img src="<%=g.MainPicture.SmallPictureUrl %>" class="mask_pic3"  /></a></li>
                   <li><a href="/Goods/<%=g.BaseInfo.GoodsID %>.html" class="black0" target="_blank" title="<%=g.BaseInfo.GoodsName %> <%=g.BaseInfo.Promotions %>"><%=Utility.GetMaxString(g.BaseInfo.GoodsName,30,false)%></a></li>
                   <li class="orange"><%=Utility.FormatMoneyStr(g.SalePrice) %>元</li>
                   <li class="button_buy">
                     <a href="javascript:void(0);" onclick="AddToFavorite(<%=g.BaseInfo.GoodsID %>);" class="favo">收藏</a>
                     <a href="/home/ShoppingCarts.aspx?GoodsID=<%=g.BaseInfo.GoodsID %>" target="_blank">购买</a>
                   </li>
                </ul>
                <%} %>
				<p class="cb page_number">
                   <%=Utility.GetPageLineEx(Utility.GetWebPageUrlNoCurPage(), q.CurPage, q.PageSize, 10, q.TotalCount)%>  
                 </p>

                 <%}
                    else
                    { %>
                    <br />
                    <center>
                      [ 抱歉，没有找到符合条件的商品！ ]
                      </center>
                    <%} %>
                 

              </div>
            </div>
         </div> 
         <!--right end-->
       </div>
        
     <!--new product-->
     <!--new product end-->
         <!--六个块-->
         <!--休闲食品-->
         <!---块结束-->
        
         
     </div>
      <!--main结束-->
     <div class="share cb w960">
        <div>
           <!--#include file="~/AutoGenerate/AllPage-Bottom-Banner.htm" -->
        </div>
          <!--#include file="~/Public/bottom-shopHelper.shtml" -->
     </div>
    

    <!--#include file="~/Public/bottom.shtml" -->

</body>
</html>
